<?php

namespace App\Providers;

use App\Services\EasyWeChatServices;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //将服务容器 直接绑定到实现类上，通过app()函数获取服务容器进行调用
        $this->app->bind('EasyWechatService', function ($app) {
                return new EasyWeChatServices();
        });
       // $this->app->bind('\App\Services\EasyWeChatServices');

    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
        \Schema::defaultStringLength(191);
    }
}
